import { createRouter, createWebHistory } from 'vue-router'

import Index from '@/views/index.vue'
import Home from '@/views/home..vue'
import Cla from '@/views/cla.vue'
import Xuanche from '@/views/xuanche.vue'
import Ersou from '@/views/ersou.vue'
import Fuwu from '@/views/fuwu.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    { path: '/',redirect:'/index/home'},
    {
      path: '/index', name: 'index', component: Index, children: [
        { path: 'home', name: 'home', component: Home, },
        { path: 'cla', name: 'cla', component: Cla, },
        { path: 'xuanche', name: 'xuanche', component: Xuanche },
        { path: 'ersou', name: 'ersou', component: Ersou, },
        { path: 'fuwu', name: 'fuwu', component: Fuwu, },
      ]
    },

  ],
})

export default router
